https://community.wd.com/t/clean-os-debian-openmediavault-and-other-firmwares/93714/870
Thx for Davincino.

---

# Install

1. Edit /etc/fstab, add mount options to /dev/sda4 (Data partition) and /dev/md0 (root):
   `noatime,nodiratime,commit=60`

1. Ramlog already installed in all firmwares. But you can install it manually (Or update preinstalled):
    ```sh
    cd /tmp
    wget http://www.tremende.com/ramlog/download/ramlog_2.0.0_all.deb
    dpkg -i ramlog_2.0.0_all.deb
    rm ramlog_2.0.0_all.deb
    ```

1. Disable some services:
    ```sh
    update-rc.d bootlogd disable
    update-rc.d rrdcached disable
    update-rc.d collectd disable
    update-rc.d monit disable
    ```

    Also you can change start option in /etc/default/_service_name_
    ```sh
    insserv -v -d
    ```

1. Disable unusual cron jobs:
   crontab -e

1. Move fake-hwclock to "daily" folder:
    ```sh
    mv /etc/cron.hourly/fake-hwclock /etc/cron.daily
    ```

1. Edit samba startup script (add ram folder for tmp files):
    ```sh
    nano /etc/init.d/samba
    ```

	* in start-command after first row "deamon..." add this:
		```sh
		mount -t tmpfs tmpfs /var/run/samba
		mount -t tmpfs tmpfs /var/cache/samba
		```
	* in stop-command before "log_end_msg 0" add this:
		```sh
		umount /var/run/samba
		umount /var/cache/samba
		```

1. Increase dirty-writeback-time 5s to 60s
	```sh
	echo 6000 > /proc/sys/vm/dirty_writeback_centisecs
	```

1. Reboot.

***

# Debug

- Check if all runing normall: `/etc/init.d/ramlog status`  
- If not - read logs: `tail /var/log/ramlog`  
- `ramlog` is working with tmpfs? samba-mounts to tmpfs exists?: `df -h`  
